Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Adjust ui to changes in server #457

Merged
merged 4 commits into from
Aug 31, 2018
Merged

Conversation

danxuliu
Copy link
Member

Sorry, have to take a bus, can't explain! :-P

The standard layout in the server uses "#app-navigation",
"#app-content" and "#app-sidebar" as children of "#content"; the
navigation and sidebar are not needed, so "#app" is simply renamed to
"#app-content".

Also note that "#controls" is already the first child of "#app-content",
so there is no need to prepend it. In a similar way there are standard
CSS rules defined in the server for "#controls" as a child of
"#app-content", so no special rules need to be defined here.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
In the layout provided by the server the scrolling container is now the
body instead of the content wrapper.

Note that the container used in "galleryfileaction.js" was not modified
on purpose, as that feature is currently broken; it restores the scroll
position when the slideshow is hidden due to the file list being
reloaded, but that does not happen in Files app, only in public pages.
Thus, in Files app it restores the position as soon as the file list is
reloaded after closing the slideshow, so it changes the scroll position,
for example, when the directory changes. However, as "#app-content" is
used as the scrolling container in that case the scroll position of the
body does not actually change.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Note that the proper replacemente for "#content-wrapper" in this case is
"#app-content" instead of "#content" due to "#app-content" having a
background colour set in the server, so if it was set to "#content" the
custom background would not be visible.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
The slideshow is a direct child of the body that is shown in front of
the other elements (header, content and footer) and fills the whole
viewport by using absolute positioning. However, as the other elements
were still shown behind it they affected the size of the body, and as
the body is the scrolling container its scroll bars were shown even if
the slideshow was shown.

Now the content and the footer are hidden when the slideshow is shown
(there is no need to hide the header due to its fixed position, which
does not affect the body size), so the body gets the size of the
slideshow and thus no scroll bars are shown.

Note, however, that when those elements are shown again the body scroll
bars will be reset to their initial position, so it is necessary to
explicitly restore them to their previous value. This is not needed for
the scroll bars of other elements, like the navigation bar or the
sidebar, as in that case the whole scrolling container was hidden and
shown; in the case of the body the scrolling container is kept and what
is hidden and shown are their contents, which alters its size and thus
its scroll bars.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@danxuliu danxuliu added bug Something isn't working design Related to the design regression Regression of a previous working feature 3. to review Waiting for reviews labels Aug 10, 2018
@danxuliu danxuliu added this to the Nextcloud 14 milestone Aug 10, 2018
@danxuliu danxuliu requested a review from skjnldsv August 10, 2018 22:28
@MorrisJobke MorrisJobke mentioned this pull request Aug 30, 2018
6 tasks
@MorrisJobke
Copy link
Member

@danxuliu @skjnldsv What is this? I would move this to 15, or not?

@MorrisJobke
Copy link
Member

Or is this ready for review?

Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to take the ✈️ no time to review ;)

@MorrisJobke
Copy link
Member

I need to take the ✈️ no time to review ;)

Just to clarify: this was a joke based on the message in the OP -> so an actual review happened ;)

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@MorrisJobke MorrisJobke merged commit bae1a33 into master Aug 31, 2018
@MorrisJobke MorrisJobke deleted the adjust-ui-to-changes-in-server branch August 31, 2018 10:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3. to review Waiting for reviews bug Something isn't working design Related to the design regression Regression of a previous working feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants